package cn.me.alphamq.common.entity.resp;

import cn.me.alphamq.common.entity.BaseMsg;

/**
 * 创建 topic 的响应对象
 *
 * @author f
 */
public class CreateTopicResp extends BaseMsg {

    /**
     * 是否创建成功
     */
    private final boolean success;

    /**
     * 创建失败的原因
     */
    private final String msg;

    public CreateTopicResp(String msgId) {
        super(msgId);
        this.success = true;
        this.msg = null;
    }

    public CreateTopicResp(String msgId, String msg) {
        super(msgId);
        this.success = false;
        this.msg = msg;
    }

    public boolean getSuccess() {
        return success;
    }

    public String getMsg() {
        return msg;
    }
}
